const HtmlWebpackPlugin = require('html-webpack-plugin');
const arr = require('./module.js');
const entry = {};
const arrHTML = [];

arr.forEach((item) => {
    arrHTML.push(
        new HtmlWebpackPlugin({
            template: `./src/manage/${item}.html`,
            filename: `manage/${item}.html`,
            chunks: [`${item}`]
        })
    );
    entry[item] = `./src/manage/${item}.js`;
})

module.exports = { arrHTML, entry };